package com.sunlong.jiangwei.entity;

import com.sunlong.jiangwei.util.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author 孙龙
 * @since 2021-02-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class JwStore implements Serializable {


    /**
     * 店铺id
     */
    @Id
    private Long storeId;

    /**
     * 店铺名称
     */
    private String storeName;

    /**
     * 店铺图片地址
     */
    private String storeImage;

    /**
     * 店铺开店时间
     */
    private Date storeStartTime;
    @Transient
    private String storeStartTimeStr;

    public String getStoreStartTimeStr() {
        return DateUtil.format(storeStartTime);
    }
}
